#for循环迭代
ll = [1,2,3,4,5]
for l in ll:
    print(l)
    
map = {'a': 1, 'b': 2, 'c': 3}
#遍历map,默认遍历key
for m in map:
    print(m)
    
#遍历value
for v in map.values():
    print(v)
    
#打印key-value
for k in map:
    print(k,':',map.get(k))
    
for k,v in map.items():
    print(k,v)
#判断一个对象是否可迭代
from collections import Iterable
print(isinstance('abcaaaaaaaaaaaaaaaaaa', Iterable))
print(isinstance([1,2,3],Iterable))
print(isinstance(123,Iterable))

#获取list角标
for i,value in enumerate(['A','B','C']):
    print(i,value)